private ["_grp","_ias","_last_used","_can_teleport"];
_ias = [];
_grp = group player;
_last_used = player getVariable "LAST_AI_TELEPORT_TIME";
_can_teleport = true;
if (!isNil "_last_used") then {
	if ((time - _last_used) < 30) exitwith {
		player sideChat Format[localize "STR_MF_TELEPORT_IA_WAIT",ceil(30 - (time - _last_used))];
		_can_teleport = false;
	};
};
if (_can_teleport) then {
	if (_grp != grpNull) then {
		{
			if (alive _x && !isplayer _x && (_x distance player) <= 5) then {
				_ias set [ count _ias, _x];
			};
		} foreach units _grp;
	};
	if (count _ias > 0) then {
		{
			_x setPos (getPos player);
		} foreach _ias;
		player setVariable ["LAST_AI_TELEPORT_TIME", time];
	};
};